package com.hunan.api.catv.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author jiangzhuan
 * @since 2020-12-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("praise")
public class Praise extends Model<Praise> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键Id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 被点赞资源唯一ID
     */
    private String bePraiseId;

    /**
     * 被点赞资源，默认news表短视频:0，评论：5
     */
    private Integer bePraiseType;

    /**
     * 被点赞用户id
     */
    private Integer beMemberId;

    /**
     * 点赞用户id
     */
    private Integer memberId;

    /**
     * 状态:0，待审核 1，通过 2，不通过
     */
    private Integer state;

    /**
     * 评论时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 逻辑删除 0删除 1未删除
     */
    private Integer deleted;


    public static final String ID = "id";

    public static final String BE_PRAISE_ID = "be_praise_id";

    public static final String BE_PRAISE_TYPE = "be_praise_type";

    public static final String BE_MEMBER_ID = "be_member_id";

    public static final String MEMBER_ID = "member_id";

    public static final String STATE = "state";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String DELETED = "deleted";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
